package com.isoft.systemconsumer.service.openFeign;

import com.isoft.systemconsumer.bean.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "SystemProvidor")
public interface SysUserOpenFeignService {
    final String SystemProvidorUrl="/systemprovidor/sysuser/";
    /*无安全框架登录测试*/
    @PostMapping(SystemProvidorUrl+"logintest")
    public SysUser loginTest(@RequestParam("username") String username, @RequestParam("password") String password);

    /*获取所有用户信息*/
    @GetMapping(SystemProvidorUrl+"getall")
    public List<SysUser> getAllSysUser();

    /*根据ID获取用户信息*/
    @GetMapping(SystemProvidorUrl+"{sysuid}")

    public SysUser getById(@PathVariable("sysuid") Integer id);
}
